home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************
- *
- * $Source: /unixb/home/unixlib/source/unixlib37/src/sys/c/RCS/errlist,v $
- * $Date: 1996/11/09 18:02:54 $
- * $Revision: 1.4 $
- * $State: Rel $
- * $Author: unixlib $
- *
- * $Log: errlist,v $
- * Revision 1.4 1996/11/09 18:02:54 unixlib
- * Remove extraneous error string.
- *
- * Revision 1.3 1996/10/30 21:59:00 unixlib
- * Massive changes made by Nick Burret and Peter Burwood.
- *
- * Revision 1.2 1996/09/16 21:23:52 unixlib
- * CL_0002 Nick Burret
- * Minor changes to file handling
- * Change most error numbers, and use in assembler sources (SJC)
- * Various minor bug fixes and compatability changes.
- *
- * Revision 1.1 1996/04/19 21:34:24 simon
- * Initial revision
- *
- ***************************************************************************/
-
- static const char rcs_id[] = "$Id: errlist,v 1.4 1996/11/09 18:02:54 unixlib Rel $";
-
- #include <string.h>
- #include <errno.h>
-
- int sys_nerr = __SYS_NERR + 1;
-
- char *sys_errlist[__SYS_NERR + 1] =
- {
- "Error 0",
- "Operation not permitted", /* EPERM */
- "No such file or directory", /* ENOENT */
- "No such process", /* ESRCH */
- "Interrupted system call", /* EINTR */
- "Input/output error", /* EIO */
- "No such device or address", /* ENXIO */
- "Argument list too long", /* E2BIG */
- "Exec format error", /* ENOEXEC */
- "Bad file descriptor", /* EBADF */
- "No child processes", /* ECHILD */
- "Resource deadlock avoided", /* EDEADLK */
- "Cannot allocate memory", /* ENOMEM */
- "Permission denied", /* EACCES */
- "Bad address", /* EFAULT */
- "Block device required", /* ENOTBLK */
- "Device busy", /* EBUSY */
- "File exists", /* EEXIST */
- "Invalid cross-device link", /* EXDEX */
- "Operation not supported by device", /* ENODEV */
- "Not a directory", /* ENOTDIR */
- "Is a directory", /* EISDIR */
- "Invalid argument", /* EINVAL */
- "Too many open files in system", /* ENFILE */
- "Too many open files", /* EMFILE */
- "Inappropriate ioctl for device", /* ENOTTY */
- "Text file busy", /* ETXTBSY */
- "File too large", /* EFBIG */
- "No space left on device", /* ENOSPC */
- "Illegal seek", /* ESPIPE */
- "Read-only file system", /* EROFS */
- "Too many links", /* EMLINK */
- "Broken pipe", /* EPIPE */
- "Argument out of domain", /* EDOM */
- "Range error", /* ERANGE */
- "Operation would block", /* EWOULDBLOCK */
- "Operation now in progress", /* EINPROGRESS */
- "Operation already in progress", /* EALREADY */
- "Socket operation on non-socket", /* ENOTSOCK */
- "Destination address required", /* EDESTADDRREQ */
- "Message too long", /* EMSGSIZE */
- "Protocol wrong type for socket", /* EPROTOTYPE */
- "Option not supported by protocol", /* ENOPROTOOPT */
- "Protocol not supported", /* EPROTONOSUPPORT */
- "Socket type not supported", /* ESOCKTNOSUPPORT */
- "Operation not suppoted", /* EOPNOTSUPP */
- "Protocol family not supported", /* EPFNOSUPPORT */
- "Address family not supported by protocol family", /* EAFNOSUPPORT */
- "Address already in use", /* EADDRINUSE */
- "Can't assign requested address", /* EADDRNOTAVAIL */
- "Network is down", /* ENETDOWN */
- "Network unreachable", /* ENETUNREACH */
- "Network dropped connection on reset", /* ENETRESET */
- "Software caused connection abort", /* ECONNABORTED */
- "Connection reset by peer", /* ECONNRESET */
- "No buffer space available", /* ENOBUFS */
- "Socket is already connected", /* EISCONN */
- "Socket is not connected", /* ENOTCONN */
- "Can't send after socket shutdown", /* ESHUTDOWN */
- "Too many references: can't splice", /* ETOOMANYREFS */
- "Connection timed out", /* ETIMEDOUT */
- "Connection refused", /* ECONNREFUSED */
- "Too many levels of symbolic links", /* ELOOP */
- "File name too long", /* ENAMETOOLONG */
- "Host is down", /* EHOSTDOWN */
- "Host unreachable", /* EHOSTUNREACH */
- "Directory not empty", /* ENOTEMPTY */
- "Too many processes", /* EPROCLIM */
- "Too many users", /* EUSERS */
- "Disc quota exceeded", /* EDQUOT */
- "Stale NFS file handle", /* ESTALE */
- "Too many levels of remote in path", /* EREMOTE */
- "RPC struct is bad", /* EBADRPC */
- "RPC version wrong", /* ERPCMISMATCH */
- "RPC program not available", /* EPROGUNAVAIL */
- "RPC program version wrong", /* EPROGMISMATCH */
- "RPC bad procedure for program", /* EPROCUNAVAIL */
- "No locks available", /* ENOLCK */
- "Function not implemented", /* ENOSYS */
- "Inappropriate file type or format", /* EFTYPE */
- "Authentication error", /* EAUTH */
- "Need authenticator", /* ENEEDAUTH */
- "Resource temporarily unavailable", /* EAGAIN */
- "", /* 83 */
- "", /* 84 */
- "", /* 85 */
- "", /* 86 */
- "", /* 87 */
- "", /* 88 */
- "", /* 89 */
- "", /* 90 */
- "", /* 91 */
- "", /* 92 */
- "", /* 93 */
- "", /* 94 */
- "", /* 95 */
- "", /* 96 */
- "", /* 97 */
- "", /* 98 */
- "", /* 99 */
- "Inappropriate operation for background process", /* EBACKGROUND */
- "Translator died", /* EDIED */
- "?", /* ED */
- "A pretty bad error", /* EGREGIOUS */
- "?", /* EIEIO */
- "Gratuitous error", /* EGRATUITOUS */
- "RISC OS error", /* EOPSYS */
- "Signal Received" /* as flagged by SIG_ERR */
- };
-
- char *
- strerror (register int e)
- {
- if (e < 0 || e >= sys_nerr)
- return (0);
-
- return (sys_errlist[e]);
- }
-